<script>

//Check the Button if it is clicked. Once it is clicked fetch a List of rooms and generate a table out of it! 


  $(function() {
    $( "#dialog" ).dialog({
      modal: true,
      autoOpen: false,
     
      show: {
        effect: "blind",
        duration: 1000
      },
      hide: {
        effect: "explode",
        duration: 1000
      }
    }).parent().find('.ui-dialog-titlebar-close').hide();
 
    $( "#opener" ).click(function() {
      $( "#dialog" ).dialog( "open" );
    });
  });
</script>




<h2>Raum suchen</h2>
<fieldset>
<?php
/*
 * Es muss über jQuery eine Anfrage erstellt werden. Dadurch kann man einen popup machen.
 * Wenn man in dem Popup seinen Raum gefunden hat muss man zu der Booking Seite gebracht werden.
 * 
 */
    echo $this->Form->create('Booking');
    echo $this->Form->input('start', array('timeFormat' => 24));
    echo $this->Form->input('ende', array('timeFormat' => 24));  
    echo $this->Form->input('teilnehmer'); 
    echo $this->Form->end(__('Submit'));
    ?>
    
    <div id="dialog" title="Raum Auswahl">
        <p>This is an animated dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p>
        <?php
            // echo $this->Form->input('Feature_id', array('multiple' => 'multiple'));
             
        ?>
    </div>
    <button id="opener"> Get Room </button>
</fieldset>